package com.jifeng.api.wxpay.controller;


import com.jifeng.api.wxpay.service.WXPayNotifyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/****************************************************
 *
 *   小程序回调控制器
 *
 **************************************************/
@RestController
@RequestMapping("wxpay/notify")
@Slf4j
public class WXPayNotifyController {



    @Autowired
    WXPayNotifyService wxPayNotifyService;


    /**
     * 功能描述: <小程序回调>
     **/
    @RequestMapping(value = "start")
    public void startNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        wxPayNotifyService.startNotify(request,response);

    }

    @RequestMapping(value = "end")
    public void endNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        wxPayNotifyService.endNotify(request,response);

    }
}


